package com.yueshang.neuron.modular.system.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yueshang.neuron.common.util.Node;
import com.yueshang.neuron.modular.system.api.IDeptService;
import com.yueshang.neuron.modular.system.dao.mapper.DeptMapper;
import com.yueshang.neuron.modular.system.model.Dept;
import com.yueshang.neuron.modular.system.vo.res.node.ZTreeNode;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * 部门具体实现处理service实现
 *
 * @author shililu
 * @since 2018-08-30 13:02:48
 */
@Service
public class DeptServiceImpl extends ServiceImpl<DeptMapper,Dept> implements IDeptService {

    @Resource
    private DeptMapper deptMapper;


    @Override
    public List<ZTreeNode> tree() {
        return this.baseMapper.tree();
    }

    @Override
    public List<Map<String, Object>> list(String condition) {
        return this.baseMapper.list(condition);
    }

    @Override
    public List<Node> getNodeList(String condition) {
        return deptMapper.getNodeList(condition);
    }

    @Override
    public List<Node> getParentNodeList(Long nodeId) {
        return deptMapper.getParentNodeList(nodeId);
    }
}